/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  dev
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      phaseProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

type populationBalanceTwoPhaseSystem;

phases (air water);

populationBalances (bubbles);

air
{
    type            purePhaseModel;
    diameterModel   velocityGroup;
    velocityGroupCoeffs
    {
        populationBalance    bubbles;

        formFactor      0.5235987756;

        sizeGroups
        (
            f0{d  1.00e-3; value 0;}
            f1{d  1.08e-3; value 0;}
            f2{d  1.16e-3; value 0;}
            f3{d  1.25e-3; value 0;}
            f4{d  1.36e-3; value 0;}
            f5{d  1.46e-3; value 0;}
            f6{d  1.58e-3; value 0;}
            f7{d  1.71e-3; value 0;}
            f8{d  1.85e-3; value 0;}
            f9{d  2.00e-3; value 0;}
            f10{d  2.16e-3; value 0;}
            f11{d  2.33e-3; value 0;}
            f12{d  2.51e-3; value 0;}
            f13{d  2.72e-3; value 0.25;}
            f14{d  2.93e-3; value 0.5;}
            f15{d  3.17e-3; value 0.25 ;}
            f16{d  3.42e-3; value 0;}
            f17{d  3.70e-3; value 0;}
            f18{d  4.00e-3; value 0;}
            f19{d  4.32e-3; value 0;}
            f20{d  4.66e-3; value 0;}
            f21{d  5.03e-3; value 0;}
        );
    }

    residualAlpha   1e-6;
}

water
{
    type            purePhaseModel;
    diameterModel   constant;
    constantCoeffs
    {
        d               1e-4;
    }

    residualAlpha   1e-6;
}

populationBalanceCoeffs
{
    bubbles
    {
        continuousPhase water;

        coalescenceModels
        (
            CoulaloglouTavlarides{}
        );

        binaryBreakupModels
        ();

        breakupModels
        (
            exponential
            {
                C 10.0;
                exponent 1.0;
                daughterSizeDistributionModel uniformBinary;
            }
        );

        driftModels
        (
            densityChange{}
        );

        nucleationModels
        ();
    }
}

blending
{
    default
    {
        type            linear;
        minFullyContinuousAlpha.air 0.7;
        minPartlyContinuousAlpha.air 0.3;
        minFullyContinuousAlpha.water 0.7;
        minPartlyContinuousAlpha.water 0.3;
    }

    drag
    {
        type            linear;
        minFullyContinuousAlpha.air 0.7;
        minPartlyContinuousAlpha.air 0.5;
        minFullyContinuousAlpha.water 0.7;
        minPartlyContinuousAlpha.water 0.5;
    }
}

surfaceTension
(
    (air and water)
    {
        type            constant;
        sigma           0.07;
    }
);

aspectRatio
(
    (air in water)
    {
        type            constant;
        E0              1.0;
    }

    (water in air)
    {
        type            constant;
        E0              1.0;
    }
);

drag
(
    (air in water)
    {
        type            SchillerNaumann;
        residualRe      1e-3;
        swarmCorrection
        {
            type        none;
        }
    }

    (water in air)
    {
        type            SchillerNaumann;
        residualRe      1e-3;
        swarmCorrection
        {
            type        none;
        }
    }

    (air and water)
    {
        type            segregated;
        m               0.5;
        n               8;
        swarmCorrection
        {
            type        none;
        }
    }
);

virtualMass
(
    (air in water)
    {
        type            constantCoefficient;
        Cvm             0.5;
    }

    (water in air)
    {
        type            constantCoefficient;
        Cvm             0.5;
    }
);

heatTransfer
(
    (air in water)
    {
        type            RanzMarshall;
        residualAlpha   1e-4;
    }

    (water in air)
    {
        type            RanzMarshall;
        residualAlpha   1e-4;
    }
);

phaseTransfer
(
);

lift
(
);

wallLubrication
(
);

turbulentDispersion
(
);

// Minimum allowable pressure
pMin            10000;


// ************************************************************************* //
